Global Validation
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global validation.
When to use this skill
- When implementing server-side validation for API endpoints, forms, or data processing
- When adding client-side validation for immediate user feedback (but always duplicating server-side)
- When validating user inputs in forms, search fields, or text inputs
- When processing API request payloads, query parameters, or file uploads
- When sanitizing inputs to prevent SQL injection, XSS, or command injection attacks
- When validating data types, formats (email, phone, date), required fields, and ranges
- When providing specific, helpful error messages for each validation failure
- When using allowlists (defining what's allowed) rather than blocklists (blocking bad patterns)
- When implementing business rule validation (sufficient balance, valid dates, inventory checks)
- When ensuring validation is applied consistently across all entry points (web, API, background jobs)
- When failing early by rejecting invalid data before processing or storing it
- When working with form validation libraries or schema validation tools (Yup, Zod, Joi, Pydantic)
- When adding validation error handling in UI components or API error responses
- When testing validation logic to ensure security and data integrity
Instructions
For details, refer to the information provided in this file: global validation